package top.sssd.auth.model.user.converter;

import java.time.LocalDateTime;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import top.sssd.auth.model.user.dto.UserDto;
import top.sssd.auth.model.user.entity.User;
import top.sssd.auth.model.user.request.UserSaveOrUpdateReq;
import top.sssd.auth.model.user.response.UserResp;


/**
 * @author sssd
 * @description 用户表 Converter转换类
 * @create ${time.now}
 * @version: 1.0.0-SNAPSHOT
 */
@Mapper
public interface UserConverter {

    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    UserResp entityToResp(User user);

    User saveOrUpdateUserReqToEntity(UserSaveOrUpdateReq userSaveOrUpdateReq);

    User dtoToEntity(UserDto userDto);

    UserDto entityToDto(User user);

}

